package com.example.carproviderbackstage.service.impl.dl.admin;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.carinterface.pojo.OwnerCard;
import com.example.carinterface.service.dl.admin.OwnerCardService1;
import com.example.carinterface.utils.ResultJson;
import com.example.carproviderbackstage.mapper.dl.admin.OwnerCardMapper1;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class OwnerCardServiceImpl1 implements OwnerCardService1 {
    @Autowired
    OwnerCardMapper1 ownerCardMapper1;
    @Override
    public Integer insertOwnerCard(OwnerCard ownerCard) {
        return ownerCardMapper1.insertOwnerCard(ownerCard);
    }

    @Override
    public ResultJson<List> selectOwnerCard(Integer userId) {
        List<Map> list = new ArrayList<>();
        list=ownerCardMapper1.selectOwnerCard(userId);
        ResultJson<List> resultJson=new ResultJson<>();
        resultJson.setSuccess("查询成功",list);
        return resultJson;
    }
}
